var login = new Vue({
		el:"#login",
		data:{
			email: '',
			password: '',
			compass: '',
			result: '',
		},
		methods:{
			login:function(){
				var that = this;
				if(this.password != this.compass){
					alert("两次密码不一致！");
					return false;
				}
				axios.post(base_ure+'/user/login', {
				    email: that.email,
				    password: that.password,
				})
				.then(function (response) {
				 that.result = response.data;
				 console.log(that.result);
				 if(that.result.code == "200"){
					 window.sessionStorage.setItem("email",that.email);
					 window.sessionStorage.setItem("uuid",that.result.data);
					 window.location.href = "home.html";
				 }else{
					 alert("登录失败，请重试！");
					 return false;
				 }
				})
				.catch(function (error) {
				 console.log(error);
				 alert("出错了，请重试！");
				});
			},
		},
		mounted() {
			
		},
})